/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.opu.translator;

/**
 *
 * @author yura
 */
public class TypedString {

    protected String string;
    protected int type;

    /** type - text */
    public static final int TYPE_TEXT = 0;

    /** type - variable */
    public static final int TYPE_VAR = 1;

    public TypedString(String string, int type) {
        this.string = string;
        this.type = type;
    }

    public TypedString(String string) {
        this(string, TYPE_TEXT);
    }

    /**
     * Get the value of type
     *
     * @return the value of type
     */
    public int getType() {
        return type;
    }

    /**
     * Set the value of type
     *
     * @param type new value of type
     */
    public void setType(int type) {
        this.type = type;
    }

    /**
     * Get the value of string
     *
     * @return the value of string
     */
    public String getString() {
        return string;
    }

    /**
     * Set the value of string
     *
     * @param string new value of string
     */
    public void setString(String string) {
        this.string = string;
    }

    @Override
    public String toString() {
        return type + ":" + string.toString();
    }


}
